package hu.sulirend.model;

import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.OneToMany;

/**
 * Indicates if the StudentGroups can be united, means have the same SubjectOfTeacher 
 * and Grade.
 * 
 * @see <code>hu.sulirend.model.StudentGroup</code>
 * @see <code>hu.sulirend.model.SubjectOfTeacher</code>
 * @see <code>hu.sulirend.model.Grade</code>
 *
 * @author <a href="mailto: peter.szilagyi@gmail.com">Peter Szilagyi</a> 
 * @since 2008
 */
@Entity
public class CombinedGroups extends BaseEntity {

	private static final long serialVersionUID = 8036167552617699381L;
	
	private Set<StudentGroup> unitedGroups;

	@OneToMany(fetch=FetchType.EAGER, cascade={CascadeType.ALL}, mappedBy="combinedGroups")
	public Set<StudentGroup> getUnitedGroups() {
		return unitedGroups;
	}
	public void setUnitedGroups(Set<StudentGroup> unitedGroups) {
		this.unitedGroups = unitedGroups;
	}
	
}
